﻿<UserControl x:Class="FunctionScope.Views.Trace2DPlotSettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:FunctionScope.Views"
             xmlns:models="clr-namespace:FunctionScope.Models"
             xmlns:convertors="clr-namespace:FunctionScope.Views.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="240.373" d:DesignWidth="300">

    <UserControl.DataContext>
        <models:Trace2DPlotSettingsModel/>
    </UserControl.DataContext>

    <UserControl.Resources>
        <convertors:TimeMSConvertor x:Key="MillisecondConvertor"/>
    </UserControl.Resources>

    <Grid Margin="0" Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <Label x:Name="lbl_Persistance" Content="Persistence" HorizontalAlignment="Right" VerticalAlignment="Center" Height="26" Width="69"/>
        <Label x:Name="lbl_ShowGraticule" Content="Graticule" HorizontalAlignment="Right" Grid.Row="1" Height="26" Width="60" VerticalAlignment="Center"/>
        <Label x:Name="lbl_SubPixel" Content="Subpixel Rendering" HorizontalAlignment="Right" Grid.Row="2" Height="26"  VerticalAlignment="Center"/>
        
        <Label x:Name="lbl_PersistenceValue" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Center" Content="{Binding PersistenceMS, Mode=OneWay, Converter={StaticResource MillisecondConvertor}}"/>
        <Slider x:Name="sld_Persistance" Grid.Column="1" Margin="5" Grid.Row="0" VerticalAlignment="Center" Maximum="1000" Minimum="1" Value="{Binding PersistenceMS}" Height="18" SmallChange="0"/>
        <CheckBox x:Name="chk_ShowGraticule" Grid.Column="1" Margin="5" Grid.Row="1" VerticalAlignment="Center" IsChecked="{Binding ShowGraticule}" Height="14"/>
        <CheckBox x:Name="chk_SubpixelRedering" Grid.Column="1" Margin="5" Grid.Row="2" VerticalAlignment="Center" IsChecked="{Binding SubpixelRendering}" Height="14"/>
        
    </Grid>
</UserControl>
